{% extends "common.html" %}
{% block css %}

<style type="text/css">
  .blue{
    background:#31d2e7;
    color: white;
  }
</style>
{% endblock %}
{% load i18n %}
{% block content %}
{% if linkList %}
  

<div class="communicate ">
        <div class="communicate-left">
       
        <div class="communicate-left_company">
            <dl>
            <!-- <dt><img src="images/icontx.png"></dt> -->
          
            {% for x in linkList %}
             {% if request.session.type == 2 %}
          

        <dd onclick="window.location.href = ('{% url "dialogue" x.pk %}')" style="cursor:pointer">
          {% else %}
            <dd onclick="window.location.href = ('{% url "dialogue" x.uid.pk %}')" style="cursor:pointer">
             {% endif %}
            {% if request.session.type == 2 %}
              <h2>{{x.realName}}</h2>
        
      <p>{{x.workYear}}年{% trans "experience" %}<span>{% if x.gender == True %}
          {% trans "man" %}
          
          {% else %}
        {% trans "woman" %}
        
      {% endif %}</span><span>
                  {% trans x.get_degree_display %}
              </span>
              {# <span>25{% trans "age" %}</span> #}
              </p>
                 {% else %}
        <h2><a>{{x.name}}</a></h2>
          <p>{# <a>{{x.jpPayment}}{% trans "ten thousand yen" %}</a> #} {% if  x.get_location_display %}
                      {% trans x.get_location_display %}  
  {% elif x.uid.get_location_display %}
                    {% trans x.uid.get_location_display %}
                 {% endif %}</p>

              



               {% endif %}
          
            </dd>
            {% endfor %}
           
            </dl>
            
            
          
        </div> 
        </div> 
        <div class="communicate-right">
        <div class="a_company">


            <h3><!-- <a href="#">ww</a> --></h3>
           {% for x in messageList %}
             <dl>
            <!-- <dt> <img src="images/icongstx.png"> </dt>-->

      <dd><h2>
        
           <b>{{x.comeFrom.name}}</b>
           

      <span>{{x.addTime|date:'Y-m-d'}}</span>
           </h2><p> {{x.content}}</p></dd>
            </dl>
           {% endfor %}


            
            
            
        </div> 

        <div class="submit_information">
        <form action="{% url "dialogue" %}" method="post">
          <input  type="hidden" name="id" class="ff" value="{{id}}">
        <input type="text" name="content" class="ff">
        {% csrf_token %}
         <button  type="button" onclick="check()">{% trans "send" %}</button>
  </form>
</div>

        </div>
        </div>
<script type="text/javascript">
  function check(){
  
   var c = $('[name="content"]').val()
   if (c == ''){
      alert('请输入文字内容')
      return false
   }
   $('form').submit()
   return true
  }
</script>

{% else %}
<div class="communicate" style="height:150px;text-align:center">{% trans "There is no dialog here" %}</div>

{% endif %}

{% endblock %}  
